package cn.lizemin.fakedata;

import com.google.common.base.Objects;

/**
 * @author 李泽民
 * @Date 2024/2/18 18:06
 * @Description
 */
public class Teacher {
    private String name;
    private Integer age;

    public Teacher(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Teacher teacher = (Teacher) o;
        return Objects.equal(name, teacher.name) && Objects.equal(age, teacher.age);
    }

//    @Override
//    public int hashCode() {
//        return Objects.hashCode(name, age);
//    }


    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
